package com.decent.common.entity.common;

import com.decent.common.enums.OrderStateEnum;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author: decent Gjh
 * @date: 2022/10/29/16:59
 * @description:
 */
@Data
@ToString
@Builder
@AllArgsConstructor
public class Order {
    public Order() {
    }

    /**
     * 订单id
     */
    @NotNull(message = "请输入订单id ", groups = {Delete.class})
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Integer id;
    /**
     * 商品id
     */
    private Integer goodId;
    /**
     * 品牌id
     */
    private Integer brandId;
    /**
     * 分类id
     */
    private Integer classifyId;
    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为null",groups = {Select.class})
    private Integer userId;
    /**
     * 数量
     */
    private Integer num;
    /**
     * 总价
     */
    private BigDecimal totalPrice;
    /**
     * 订单状态
     */
    private OrderStateEnum orderState;
    /**
     * 订单编号
     */
    private String orderUuid;
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * link
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String chengOrderNo;
}
